package com.insurance.common.enums;

/**
 * 支付类型枚举类
 *
 * @version 1.0
 * @date 2020/9/20
 **/
public enum PayTypeEnum {

    ZFB("01", "支付宝支付"),
    WX("02", "微信支付"),
    PINGAN("03", "平安支付"),
    QT("99", "其他");

    private String code;

    private String msg;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    PayTypeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String getMessage(String code){
        String message = "";
        PayTypeEnum[] values = PayTypeEnum.values();
        for (PayTypeEnum enterpriseCardTypeEnum : values){
            if(code.equals(enterpriseCardTypeEnum.getCode())){
                message = enterpriseCardTypeEnum.getMsg();
                break;
            }
        }
        return message;
    }



}
